Display warning when Nakadi SQL URL is not specified. #107
+11
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
One-line summary
Display warning message when a dump message is used but Nakadi SQL URL is not specified.
Description
Clin supports dumping both event definitions and Nakadi SQL definitions via common
dump
command. Nakadi SQL endpoint is separated from the messaging API and currently if the Nakadi SQL endpoint is not specified in the configuration Clin silently skips querying the SQL endpoint and goes directly to the messaging endpoint. This is misinterpreted by Nakadi backend and the returned result is an event definition instead of the SQL definition.This behavior is misleading to the user of Clin that expects an SQL definition to be returned. In order to make the usage of Clin more interactive and friendly to the user, it will display a warning log line
Configuration key nakadi_sql_url was not defined for your environment {env}. You won't be able to dump Nakadi SQL.
whendump
command is executed and the URL of the SQL endpoint was not configured.Additionally
nakadi_sql_url
was added to the example configuration in the docs to make it clear that the configuration key is expected.Types of Changes
Tasks
List of tasks you will do to complete the PR
None
Review
List of tasks the reviewer must do to review the PR
None
Deployment Notes
None